<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Relations\BelongsToMany;

class User extends Model
{
    protected $table  = 'user';
    public function roles(): BelongsToMany
    {
        return $this->belongsToMany(Role::class, UserRelRole::class, 'user_id', 'role_id')->select(['id', 'name']);
    }
}
